//
//  MessagePackResponseSerializer.m
//  OA
//
//  Created by Guo Rui on 2017/12/4.
//  Copyright © 2017年 GR Harry. All rights reserved.
//

#import "MessagePackResponseSerializer.h"
#import <MPMessagePack/MPMessagePack.h>
@implementation MessagePackResponseSerializer

- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response
                                    data:(nullable NSData *)data
                                   error:(NSError * _Nullable __autoreleasing *)error
{
    //解析msg pack
    id responseObject = [MPMessagePackReader readData:data error:error];
    if (*error) {
        return [super responseObjectForResponse:response data:data error:error];
    }
    return responseObject;
}

@end
